package cn.com.cifi.mars.web.action.sys;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import cn.com.cifi.mars.bean.vo.sys.rsp.IdmPositionPageVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.PositionDetailVo;
import cn.com.cifi.mars.common.base.BaseAction;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.service.IdmPositionService;
@RestController
public class PositionController extends BaseAction implements IPositionController{

	@Autowired
	private IdmPositionService idmPositionService;
	

	/**
	 * 分页查询组织机构--岗位信息
	 */
	@Override
	public R<IdmPositionPageVo> getOrgPositionPage(String apiVersion, String current, String pageSize, String jobName,String belongDepId) {
		return ok(idmPositionService.queryOrgPositionPage(current,pageSize,jobName,belongDepId));
	}

	/**
	 * 权限管理-岗位明细分页
	 */
	@Override
	public R<PositionDetailVo> getPostAuthPage(String apiVersion, String current, String pageSize, String jobName,String belongJobDefId) {
		return ok(idmPositionService.queryPositionDetailPage(current,pageSize,jobName,belongJobDefId));
	}
	
	/**
	 * 根据岗位名称查询岗位下的用户
	 */
	@Override
	public R<String> getUserByJobName(String apiVersion, String jobName) {
		return ok(idmPositionService.getUserByJobName(jobName));
	}

}
